package com.hl.toolkit.server.tycoin.user.slaveservice;

import com.tycoin.common.repository.AbstractRepository;
import com.tycoin.common.service.AbstractService;
import com.tycoin.user.slaveentity.TycoinAddress;
import com.tycoin.user.slaverepository.TycoinAddressRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service	
@Transactional(value = "slaveTransactionManager", readOnly = true)
public class TycoinAddressService extends AbstractService<TycoinAddress, Long> {

	@Autowired
	private TycoinAddressRepository tycoinAddressRepository;
	
	
	@Override
	public AbstractRepository<TycoinAddress, Long> getRepository() {
 		return tycoinAddressRepository;
	}
	public List<TycoinAddress> findOneByUserid(Long userid) {
		return tycoinAddressRepository.findByUserid(userid);
	}


	
	
	

}
